Creating a parameter field

Use the following steps to create a parameter that enables the user to specify a list of customers for a specific country. This procedure is made up of two sets of steps. The first is creating the parameter, and the second is using the Select Expert to incorporate the parameter.

To create a parameter field
  1. Check to make sure your report is open in the Design tab.

    This procedure uses Group.rpt, a sample report that is included with the Crystal Reports software.

  2. On the Insert menu, click Field Object.

    Tip:     Another way to do this is to click the Insert Fields button on the Standard toolbar.

    The Field Explorer dialog box appears.

  3. Select Parameter Fields and click New.

    The Create Parameter Field dialog box appears.

  4. Enter a name for the parameter in the Name field (up to 255 alphanumeric characters).

    This example uses Country.

  5. Enter the desired prompting text in the Prompting text field (up to 255 alphanumeric characters).

    This is the text that appears in the Enter Parameter Values dialog box when the report is refreshed. This example uses "Select a Country."

  6. Select the appropriate Value type from the list.

    This example uses String.

    Note:    When creating a parameter whose Value type is either Date or DateTime, you can change the date format to suit your needs. For details, see Changing your default field formats.

  7. Click Set Default Values.

    The Set Default Values dialog box appears.

  8. Check to make sure the Browse table is set to Customer.
  9. From the Browse field drop-down list, select Country.
  10. Click >> to move all of the countries to the Default Values area.

    This example will enable the user to choose from any of the countries. If you want to limit the selection, move only the countries you would like the user to choose from.

  11. Click OK.

    The Create Parameter Field dialog box appears.

  12. Click OK.

    The Field Explorer dialog box appears with the Country parameter selected.

  13. Drag and drop the Country parameter into your report.

    Note:    If you don't want to see the parameter field you dropped in your report, place it in a section you can suppress, such as a report header or footer.

  14. Click Close.

Now you are ready to proceed to the second set of steps: To incorporate the parameter into the selection.



Seagate Software IMG Holdings, Inc.
http://www.seagatesoftware.com
Support services:
http://support.seagatesoftware.com